package com.ruoyi.system.domain.dto;

import com.alibaba.fastjson2.JSONObject;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
public class FileUploadDTO {
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @NotBlank(message = "业务类型不能为空")
    private String businessType;

    @NotBlank(message = "业务ID不能为空")
    private String businessId;

    @NotBlank(message = "文件类型不能为空")
    private String fileType;

    @NotBlank(message = "文件名不能为空")
    private String fileName;

    @NotBlank(message = "文件路径不能为空")
    private String filePath;

    @NotNull(message = "文件大小不能为空")
    private Long fileSize;

    @NotBlank(message = "文件扩展名不能为空")
    private String fileExtension;

    @NotBlank(message = "MIME类型不能为空")
    private String mimeType;

    @NotBlank(message = "上传者ID不能为空")
    private String uploadedBy;

    @NotNull(message = "上传时间不能为空")
    private LocalDateTime uploadTime;

    private String status;
    private String accessLevel;
    private JSONObject metadata;
    private JSONObject chunkInfo;
    private String description;
}